<?php
declare (strict_types=1);

namespace app\model;

class User extends Model
{
    protected $schema = [
        'id'           => 'int',
        'username'     => 'varchar',
        'password'     => 'varchar',
        'created_time' => 'int',
        'updated_time' => 'int',
    ];

    public function discount()
    {
        return $this->hasMany(Discount::class, 'user_id', 'id');
    }
}
